\(\int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx\) [62]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 58 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d}-\frac {\csc ^2(c+d x)}{2 a d} \]

[Out]

-1/2*arctanh(cos(d*x+c))/a/d+1/2*cot(d*x+c)*csc(d*x+c)/a/d-1/2*csc(d*x+c)^2/a/d

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3957, 2785, 2686, 30, 2691, 3855} \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}-\frac {\csc ^2(c+d x)}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \]

[In]

Int[Csc[c + d*x]/(a + a*Sec[c + d*x]),x]

[Out]

-1/2*ArcTanh[Cos[c + d*x]]/(a*d) + (Cot[c + d*x]*Csc[c + d*x])/(2*a*d) - Csc[c + d*x]^2/(2*a*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2785

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cot (c+d x)}{-a-a \cos (c+d x)} \, dx \\ & = -\frac {\int \cot ^2(c+d x) \csc (c+d x) \, dx}{a}+\frac {\int \cot (c+d x) \csc ^2(c+d x) \, dx}{a} \\ & = \frac {\cot (c+d x) \csc (c+d x)}{2 a d}+\frac {\int \csc (c+d x) \, dx}{2 a}-\frac {\text {Subst}(\int x \, dx,x,\csc (c+d x))}{a d} \\ & = -\frac {\text {arctanh}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d}-\frac {\csc ^2(c+d x)}{2 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.16 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\left (1+2 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec (c+d x)}{2 a d (1+\sec (c+d x))} \]

[In]

Integrate[Csc[c + d*x]/(a + a*Sec[c + d*x]),x]

[Out]

-1/2*((1 + 2*Cos[(c + d*x)/2]^2*(Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]]))*Sec[c + d*x])/(a*d*(1 + Sec[c
 + d*x]))

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.60

method result size
parallelrisch \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}\) \(35\)
norman \(-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{4 d a}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}\) \(39\)
derivativedivides \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{4}-\frac {1}{2 \left (\cos \left (d x +c \right )+1\right )}-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{4}}{d a}\) \(43\)
default \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{4}-\frac {1}{2 \left (\cos \left (d x +c \right )+1\right )}-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{4}}{d a}\) \(43\)
risch \(-\frac {{\mathrm e}^{i \left (d x +c \right )}}{a d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d a}\) \(72\)

[In]

int(csc(d*x+c)/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/4*(-tan(1/2*d*x+1/2*c)^2+2*ln(tan(1/2*d*x+1/2*c)))/d/a

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.03 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2}{4 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-1/4*((cos(d*x + c) + 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c) + 1)*log(-1/2*cos(d*x + c) + 1/2) + 2)/(a
*d*cos(d*x + c) + a*d)

Sympy [F]

\[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\csc {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c)),x)

[Out]

Integral(csc(c + d*x)/(sec(c + d*x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.81 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a} + \frac {2}{a \cos \left (d x + c\right ) + a}}{4 \, d} \]

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

-1/4*(log(cos(d*x + c) + 1)/a - log(cos(d*x + c) - 1)/a + 2/(a*cos(d*x + c) + a))/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.97 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac {\cos \left (d x + c\right ) - 1}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{4 \, d} \]

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

1/4*(log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a + (cos(d*x + c) - 1)/(a*(cos(d*x + c) + 1)))/d

Mupad [B] (verification not implemented)

Time = 13.50 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.57 \[ \int \frac {\csc (c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {1}{2\,d\,\left (a+a\,\cos \left (c+d\,x\right )\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{2\,a\,d} \]

[In]

int(1/(sin(c + d*x)*(a + a/cos(c + d*x))),x)

[Out]

- 1/(2*d*(a + a*cos(c + d*x))) - atanh(cos(c + d*x))/(2*a*d)